/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package percobaan_1;

/**
 *
 * @author Liem
 */
import java.util.ArrayList;
import java.util.Vector;

public class ShoppingCart <t> {
    private Vector <t> goodies;
//    private ArrayList <t> goodies;
    private String nama;
    private t item;
    
    public ShoppingCart (String nama){
        this.nama = nama;
//        this.goodies = new ArrayList<t>();
        this.goodies = new Vector <t> ();
    }
    
    public String getNama(){
        return nama;
    }

    public Vector <t> getGoodies(){
//    public ArrayList <t> getGoodies(){
        return goodies;
    }
    
    public t getItem(int idx){
        return this.getGoodies().get(idx);
    }
    
    public void addItem(t item){
        this.goodies.add(item);
    }
}
